<?php $this->headLink()->appendStylesheet('css/jquery.alerts.css'); ?>
<?php $this->headLink()->appendStylesheet('css/jquery.selectbox.css'); ?>
<?php $this->headLink()->appendStylesheet('css/jquery.tipsy.css'); ?>

<?php $this->headScript()->appendFile('js/jquery.sparkbox-select.js'); ?>
<?php $this->headScript()->appendFile('js/jquery.alerts.js'); ?>
<?php $this->headScript()->appendFile('js/jquery.tipsy.js'); ?>
<?php $this->headScript()->appendFile('js/script.js'); ?>

<script type="text/javascript">
	$(document).ready(function(){
		$('#quick_action_btn').click(function(){
			if (parseInt($('#quick_actions').val()) > 0) {
				$('#quick_action').val($('#quick_actions').val());
				$('#admin_listing_frm').submit();
			}
			return false;
		});

		$(".sparkbox-custom").sbCustomSelect();

		$('#item_select').click(function(){
			if ($(this).attr('checked'))
				bAllSelected = true;
			else
				bAllSelected = false;

			$('.action_item').each(function() {
				if (!this.disabled){
					this.checked = bAllSelected;
				}
			});
		});

		$.alerts.overlayOpacity = 0.6;
		$.alerts.okButton = "&nbsp;Da&nbsp;";
		$.alerts.cancelButton = "&nbsp;Nu&nbsp;";

		$('.sterge_bott').click(function(){
			var obj = this;
			jConfirm("Sunteti sigur ca vreti sa stergeti?", "Sterge item", function(r){
				if (r) {
					window.location = $(obj).attr('href');
				}
			});
			return false;
		});

		$('a.editeaza_bott').tipsy({
			html: true,
			gravity: 's',
			fallback: 'Editeaza'
		});
		$('a.sterge_bott').tipsy({
			html: true,
			gravity: 's',
			fallback: 'Sterge'
		});

		$('#listing_sort_order_btn').click(function(){
			$('#do_sort_order').val(1);
			$('#admin_listing_frm').submit();
			return false;
		});
	});
</script>

<div class="content">
	<div class="content_midd">
		<div class="fix_20"></div>
		<div class="bara_submeniu">
			<div class="bara_submeniu_midd">
				<div class="fix_15"></div>
				<h1 class="float_left" style="width: 60%;"><?php echo $this->translate('Users'); ?></h1>
				<div class="float_right" style="width: 40%;">
					<div class="fix"></div>
						<a href="<?php echo $this->url(array('action' => '')); ?>" class="botton2 float_right"><?php echo $this->translate('Listeaza'); ?></a>
						<a href="<?php echo $this->url(array('action' => 'add')); ?>" class="botton2 float_right" style="margin-right: 10px"><?php echo $this->translate('Add'); ?></a>
					</div>
				<div class="fix_15"></div>
			</div>
		</div>

		<?php echo $this->render('admin/grid.phtml') ?>

		<div class="fix_30"></div>
	</div>
</div>